/* void main(){
  List<String> arr=["html","css","javascript"];
  arr.add("vue");             //从后面增加
  arr.insert(1, 'react');     //定点增加
  arr.remove("html");         //移除某个元素
  arr.removeAt(1);             //删除对应下标的元素
  arr.removeLast();            //删除最后一位元素
  arr.removeRange(1, 3);        //删除的范围
  print(arr);
  print(arr.length);          //获取List长度
} */

 //removeWhere()根据条件删除
/* void main(){     
  List<String> arr=["html","css","javascript","vue"];    
  arr.removeWhere((item){
    return item=="html";
  });
  print(arr);
} */

//indexOf()   读取元素的下标值
/* void main(){
  List<String> arr=["html","css","javascript","vue"];
  arr.indexOf("css");
  print(arr);
} */

// contains()    判断是否包含某个值
/* void main(){
  List<String> arr=["html","css","javascript","vue"];
  arr.contains("css");
  print(arr);
} */


//setRange (start,end,list)--修改几个就传几个
/*  void main(){
  List<String> arr=["html","css","javascript","vue"];
  arr.setRange(1, 3, ["angular","react"]);
  print(arr);
} */


// replaceRange(start,end,list)--范围替换
/*  void main(){
  List<String> arr=["html","css","javascript","vue"];
  arr.replaceRange(0, 2, ["angular","react"]);
  print(arr);
} */


//forEach()--遍历
/*  void main(){
  List<String> arr=["html","css","javascript","vue"];
  arr.forEach((item){
   print(item);
  });
}  */

// every()每个都满足条件
/* void main(){
  List<String> arr=["html","css","javascript","vue"];
  var b=arr.every((item){
    return item=="html";
  });
  print(b);       //false
}  */

//any()部分满足条件
/* void main(){
  List<String> arr=["html","css","javascript","vue"];
  var b=arr.any((item){
    return item=="html";
  });
  print(b);       //true
}  */

//map
/* void main(){
  List<String> arr=["html","css","javascript","vue"];
  var b=arr.map((item){
    return item+"s";
  });
  print(b);       //(htmls, csss, javascripts, vues)
  print(b is List);    //false
  print(b.toList());     //[htmls, csss, javascripts, vues]
}  */


//join()--将数组拼接成字符串
/* void main(){
  Iterable<String> arr=["html","css"];
  print(arr.join("/"));         //html/css
} */
